#include "videowidget.h"
#include "ui_videowidget.h"

videowidget::videowidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::videowidget)
{
    ui->setupUi(this);
    movie = new QMovie;

    movie->setFileName("C:/Users/13234/Music/雨刮器.gif");
    //setSpeed设置播放速度，动画的播放速率是用原始的动画速率百分比衡量。默认的速度是 100%
    movie->setSpeed(1000);
    ui->moiveLabel->setMovie(movie);
    movie->start();//开始播放
}

videowidget::~videowidget()
{
    delete ui;
}

void videowidget::OnPlayBtnClicked()
{
    movie->setPaused(false);//播放
}

void videowidget::OnPauseBtnClicked()
{
    movie->setPaused(true);//暂停
}


